package com.ibuonline.b2b.entity;

import java.io.Serializable;

public class AdminLog implements Serializable {

	private static final long serialVersionUID = 4367514000411279478L;

	//fields
	private java.lang.Integer logId;
	private java.lang.Integer userId;
	private java.lang.String ip;
	private java.sql.Timestamp logTime;
	private java.lang.String operation;
	private java.lang.String memo;

	//default constructor
	public AdminLog() {
	}

	//getter
	public java.lang.Integer getLogId() {
		return logId;
	}
	public java.lang.Integer getUserId() {
		return userId;
	}
	public java.lang.String getIp() {
		return ip;
	}
	public java.sql.Timestamp getLogTime() {
		return logTime;
	}
	public java.lang.String getOperation() {
		return operation;
	}
	public java.lang.String getMemo() {
		return memo;
	}

	//setter
	public void setLogId(java.lang.Integer logId) {
		this.logId = logId;
	}
	public void setUserId(java.lang.Integer userId) {
		this.userId = userId;
	}
	public void setIp(java.lang.String ip) {
		this.ip = ip;
	}
	public void setLogTime(java.sql.Timestamp logTime) {
		this.logTime = logTime;
	}
	public void setOperation(java.lang.String operation) {
		this.operation = operation;
	}
	public void setMemo(java.lang.String memo) {
		this.memo = memo;
	}

	//equals method
	public boolean equals(Object other) {
		if (this == other)
			return true;
		if (!(other instanceof AdminLog))
			return false;

		final AdminLog adminLog = (AdminLog)other;
		if (!this.logId.equals(adminLog.getLogId()))
			return false;

		return true;
	}

	//hashCode method
	public int hashCode() {
		StringBuffer keys = new StringBuffer();
		keys.append(logId).append(",");
		if (keys.length() > 0)
			keys.deleteCharAt(keys.length() - 1);
		return keys.toString().hashCode();
	}

	//toString method
	public String toString() {
		return new StringBuilder("AdminLog[")
			.append("logId=").append(logId).append(", ")
			.append("userId=").append(userId).append(", ")
			.append("ip=").append(ip).append(", ")
			.append("logTime=").append(logTime).append(", ")
			.append("operation=").append(operation).append(", ")
			.append("memo=").append(memo).append("]").toString();
	}
}